<?php
if (!defined('BASEPATH')) exit('No direct script access allowed');

class Api_finds_m extends FOX_Model
{

	function __construct ()
	{
		parent::__construct();
	}
	
	public function get_article_list($page=0,$limit=4,$ord='desc')
	{
		$start = $page*$limit;
		$query = $this->db->select('*')->from('articles')->order_by('article_id',$ord)->limit($limit,$start)->get();
		return $query->result_array();
	}
	//计算金额的总数
	public function count_balance($id){
		$this->db->select('money_id')->from('moneys')->where('user_id',$id);
		$total=$this->db->count_all_results();
		return $total;
	}
}
